package com.vcredit.creditcat.enumtype.hl;

public enum MarriageEnum {

	WH(1, "NEWMARRIAGE/WH", "未婚"), 
	YH(2, "NEWMARRIAGE/YH", "已婚"),
	SO(3, "NEWMARRIAGE/SO", "丧偶"),
	LH(4, "NEWMARRIAGE/LH", "离婚"),
	WSMHYZK(5, "NEWMARRIAGE/WSMHYZK", "未说明婚姻状况");
	
	private int code;
	private String value;
	private String desc;

	private MarriageEnum(int code, String value, String desc) {
		this.code = code;
		this.value = value;
		this.desc = desc;
	}

	public static String getCodeByDesc(int code) {
		for (MarriageEnum c : MarriageEnum.values()) {
			if (c.getCode() == code) {
				return c.value;
			}
		}
		return null;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

}
